<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <link href="/static/houtai/css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/static/houtai/js/jquery-3.0.0.min.js"></script>
    <script type="text/javascript" src="/static/houtai/commons/common.js"></script>
    <script language="javascript">
        $(function(){
            //导航切换
            $(".imglist li").click(function(){
                $(".imglist li.selected").removeClass("selected")
                $(this).addClass("selected");
            })
        })
    </script>
    <script type="text/javascript">
        $(document).ready(function(){
            $(".click").click(function(){
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function(){
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function(){
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function(){
                $(".tip").fadeOut(100);
            });

        });
    </script>
</head>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">奖章操作</a></li>
    </ul>
</div>
<div class="rightinfo">
    <table class="imgtable">
        <thead>
        <tr>
            <th>兑换码</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${page.list}" var="redeemCode">
        <tr>
            <td>${redeemCode.code}</td>
            <td><a href="/redeemCode/del8Code?id=${redeemCode.id}">删除</a></td>
        </tr>
        </c:forEach>
        </tbody>

    </table>

    <div style="text-align:center">
        <ul class="pagination pagination-lg">
            <li> <%--上一页 hasPreviousPage布尔值是否有上一页，prePage上一页页面--%>
                <c:if test="${page.hasPreviousPage}">
                    <a href="${ctx}/redeemCode/findAllCode/?pageNum=${page.prePage}&pageSize=${page.pageSize}">«</a>
                </c:if></li>
            <%--navigatepageNums 集合所有页码  --%>
            <c:forEach items="${page.navigatepageNums}" var="nav">
                <c:if test="${nav == page.pageNum}">
                    <li style="font-weight: bold;"><a href="javascript:;">${nav}</a></li>
                </c:if>
                <c:if test="${nav != page.pageNum}">
                    <li><a href="${ctx}/redeemCode/findAllCode/?pageNum=${nav}&pageSize=${page.pageSize}">${nav}</a></li>
                </c:if>
            </c:forEach>
            <%--hasNextPage 布尔值判断是否有下一页 nextPage下一页的页码--%>
            <c:if test="${page.hasNextPage}">
                <li><a href="${ctx}/redeemCode/findAllCode/?pageNum=${page.nextPage}&pageSize=${page.pageSize}">»</a></li>
            </c:if>
        </ul>
    </div>

</div>


</body>
<script language="javascript">
    $(function(){
        //导航切换
        $(".imglist li").click(function(){
            $(".imglist li.selected").removeClass("selected")
            $(this).addClass("selected");
        })
    })
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $(".click").click(function(){
            $(".tip").fadeIn(200);
        });

        $(".tiptop a").click(function(){
            $(".tip").fadeOut(200);
        });

        $(".sure").click(function(){
            $(".tip").fadeOut(100);
        });

        $(".cancel").click(function(){
            $(".tip").fadeOut(100);
        });

    });
</script>
<%@ include file="foot.jsp"%>

